#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void select_sort(int arr[], int sz)
{
	int i = 0;
	for (i = 0; i < sz; i++)
	{
		int j = 0;
		int tmp = 0;
		for (j = i+1; j < sz-1; j++)
		{
			if (arr[i] > arr[j + 1])
			{
				tmp = arr[i];
				arr[i] = arr[j + 1];
				arr[j + 1] = tmp;
			}
		}
	}
}
int main()
{

	int arr[] = { 5,6,3,4,2,8,1,9,7,10 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	select_sort(arr, sz);
	int i = 0;
	for (i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}


	return 0;

}